package com.zte.moon.yutu;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 14-1-5
 * Time: 下午10:28
 * To change this template use File | Settings | File Templates.
 */
public enum Command {
    RIGHT,LEFT,MOVE;


    public static Command valueof(String str) {
        if (str.equals("R"))
            return Command.RIGHT;
        else if (str.equals("L"))
            return Command.LEFT;
        else if (str.equals("M"))
            return Command.MOVE;
        else
            return null;
    }
}
